﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JKF.DataModule.SqlServerDAL;
using System.Data;

namespace JKF.BusinessLayer.BLL
{
    /// <summary>
    /// 业务逻辑类bllDIC_LEVEL 的摘要说明。
    /// </summary>
    public partial class bllDIC_LEVEL
    {

         /// <summary>
        /// 获取会员级别列表
        /// </summary>
        /// <param name="NAME">会员级别名称</param>
        /// <param name="pageCurrent">当前页码</param>
        /// <param name="pageSize">一页显示多少</param>
        /// <param name="pageCount">总页数</param>
        /// <param name="rowCount">总记录数</param>
        /// <returns>返回DataTable数据</returns>
        public  DataTable GetDic_LevelsBLL(string NAME, int pageCurrent, int pageSize, ref int pageCount, ref int rowCount)
        {
            return dalDIC_LEVEL.GetDic_LevelsDAL(NAME, pageCurrent, pageSize, ref pageCount, ref rowCount);
        }

         /// <summary>
        /// 从数据库中获取店面编码，保证不重复,此编号返回的是四位编码，bll层应该转成2位
        /// </summary>
        /// <returns></returns>
        public string GetLevelCodeBLL()
        {
            return dalDIC_LEVEL.GetLevelCodeDAL().Substring(2,2); //截取后两位
        }

         /// <summary>
        /// 判断是否存在此名称,true表示存在
        /// </summary>
        /// <param name="shop_name">店面名称</param>
        /// <returns></returns>
        public  bool ExistsLevelNameBLL(string level_name)
        {
            return dalDIC_LEVEL.ExistsLevelNameDAL(level_name);
        }
        /// <summary>
        /// 事务删除级别
        /// </summary>
        /// <param name="level_code"></param>
        /// <returns></returns>
        public  string TransactionSQLDeleteBLL(string level_code)
        {

            return dalDIC_LEVEL.TransactionSQLDeleteDAL(level_code);
        }
    }
}
